import java.util.Scanner;

/**
 * Created by LJY on 2017/3/12.
 */
public class CashApp2 {
    public static void main(String[] args) {
        CashCard2[] cards={
                new CashCard2("A001",500,0),
                new CashCard2("A002",300,0),
                new CashCard2("A003",1000,1)
        };
        Scanner scanner=new Scanner(System.in);
        for(CashCard2 card:cards){
            System.out.printf("为(%s,%d,%d)储值：",card.number,card.balance,card.bonus);
            card.store(scanner.nextInt());
            System.out.printf("明细(%s,%d,%d)%n",card.number,card.balance,card.bonus);
        }
    }
}
